Using customer managed keys will give administrators control over how data is encrypted to better meet compliance regulations, as well as allow for a more specific key rotation period. Using system-generated keys can sometimes lead to expired or exposed keys remaining in use, leading to insecure data. It is often recommended to use a customer managed key when the service is available.
A KMS key can only be selected for file systems when creating a new resource. To create a new EFS resource with a customer managed key, follow the steps below.
In AWS Console -
In Terraform -
References:
https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system